﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

// ReSharper disable once CheckNamespace
namespace Kaiser.Modules.Core.Aggregates
{
    public class FlowBills:Bills<FlowBills>
    {
        public DateTime? CreatetDateTime { get; set; }

        public Company Company { get; set; }

        /// <summary>
        /// 结算账户
        /// </summary>
        public SettleAcct SettleAcct { get; set; }

        public Balance Balance { get; set; }

        public double InAmount { get; set; }

        public double OutAmount { get; set; }

        public string BillsDescp
        {
            get;
            set;
        }

        public string BillCode
        {
            get;
            set;
        }

        public double CurAmonut { get; set; }

 

        internal static double GetLastAmount()
        {
            //todo 最后一条流水账户的当前价格
            var model = FlowBills.List.LastOrDefault();
            if (model!=null)
            {
                return model.CurAmonut;
            }
            return 0;
        }
    }
}
